class Solution(object):
    def maxVowels(self, s, k):
        d = {'a', 'e', 'i', 'o', 'u'}
        n = len(s)
        num = 0
        max_len = 0
        for i in range(k):
            if s[i] in d:
                num += 1
        max_len = max(max_len, num)
        for i in range(n - k):
            if s[i] in d:
                num -= 1
            if s[i + k] in d:
                num += 1
            max_len = max(max_len, num)
        return max_len